package com.itheima;

import java.time.*;

public class Demo2 {
    public static void main(String[] args) {
        LocalDateTime now = LocalDateTime.now();
        System.out.println(now);

        LocalDateTime deTime = LocalDateTime.of(2021, 6, 13, 11, 11, 11, 11);
        int year = deTime.getYear();
        int month = deTime.getMonthValue();
        int dayOfMonth = deTime.getDayOfMonth();
        int dayOfYear = deTime.getDayOfYear();
        int minute = deTime.getMinute();
        int hour = deTime.getHour();
        System.out.println("-------------------");

        LocalTime localTime11 = deTime.toLocalTime();
        LocalDate localDate11 = deTime.toLocalDate();

        System.out.println("-------------------");


        System.out.println("riqi" + deTime);
        System.out.println("nian" + year);
        System.out.println("yue" + month);
        System.out.println("yue" + dayOfMonth);
        System.out.println("nian" + dayOfYear);
        DayOfWeek dayOfWeek = deTime.getDayOfWeek();
        System.out.println("zhou" + dayOfWeek);
        System.out.println("fen" + minute);
        System.out.println("shi" + hour);


        System.out.println("-------------------");


        System.out.println(localDate11);
        System.out.println(localTime11);
        System.out.println("-------------------");



    }
}
